﻿Imports System.ComponentModel

Namespace EyeOpen.SearchFile.Windows

	Public Class AsyncWorker
		Public Sub RunWorkerAsync(Of T)(ByVal parameter As T, ByVal action As Action(Of T))
			Dim backgroundWorker = New BackgroundWorker()

			AddHandler backgroundWorker.DoWork, Sub(s, w) action(parameter)

			backgroundWorker.RunWorkerAsync(parameter)
		End Sub
	End Class
End Namespace